AMD IOMMU: Defer IO pagetable construction until device assignment
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Apr 2008 12:54:05 +0000 (13:54 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Apr 2008 12:54:05 +0000 (13:54 +0100)
commita7dc0fae6568b8849fe343f0351f30b38484b2e4
treee1f0385b0e27febe1a0aa6ec60682b59d37100b1
parent69f74e87be7d24c11d106f93275ad7004d295d7f
AMD IOMMU: Defer IO pagetable construction until device assignment

During HVM domain creation, I/O page tables are filled by coping p2m
entries from p2m table, which is a useless step for non-passthru
domain. This patch defers I/O page table construction until the moment
of device assignment. In case that pci devices are never assigned or
hot plugged, the unnecessary duplication will be avoided.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
xen/include/xen/hvm/iommu.h